

import com.ldzy.pojo.Bean4;
import com.ldzy.pojo.HelloSping;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public  static  void  main(String [] args){
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("spring-conf.xml");
        HelloSping helloSping=(HelloSping)applicationContext.getBean("helloSping");
        helloSping.shop();
        Bean4 bean4=(Bean4)applicationContext.getBean("bean4");
        System.out.println(bean4.toString());
    }
}
